package player.state;

import player.MusicPlayer;
import jaco.mp3.player.MP3Player;

/**
 * Abstract class for the state of the music player.
 * @author Pawin Suthipornopas 5510546123
 */
public abstract class PlayerState {
	
	protected MP3Player player;
	protected MusicPlayer musicPlayer;
	
	/**
	 * Create this music player and assign attribute.
	 * @param player is the player to be played.
	 */
	public PlayerState(MP3Player player, MusicPlayer musicPlayer){
		this.player = player;
		this.musicPlayer = musicPlayer;
	}
	
	/**
	 * Handle the pressing start action, play the music. 
	 * Handles differently with each states.
	 */
	public abstract void handlePlay();
	
	/**
	 * Handle the pressing stop action, stop the music player.
	 * Handles differently with each states.
	 */
	public abstract void handleStop();
	
	/**
	 * Handle the pressing pause action, pause the music player.
	 * Handles differently with each states.
	 */
	public abstract void handlePause();

	/**
	 * Handle the pressing next action, skip to the next song in the playlist.
	 * Handles differently with each states.
	 */
	public abstract void handleNext();
	
	/**
	 * Handle the pressing previous action, skip to the previous song in the playlist.
	 * Handles differently with each states.
	 */
	public abstract void handlePrevious();
}
